//
//  WalletDetailTableViewCell.m
//  MyNewProject
//
//  Created by 王春辉 on 2020/1/1.
//  Copyright © 2020年 sun. All rights reserved.
//

#import "WalletDetailTableViewCell.h"


@implementation WalletDetailTableViewCell
@synthesize nameLabel = _nameLabel;
@synthesize dateLabel = _dateLabel;
@synthesize contentLabel = _contentLabel;

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initContentView];
    }
    return self;
}
- (void)initContentView {
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_offset(16);
        make.bottom.mas_equalTo(self.mas_centerY);
    }];
    
    [self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.nameLabel);
        make.top.mas_equalTo(self.nameLabel.mas_bottom).mas_offset(2);
    }];
    
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.right.mas_offset(-16);
    }];
}

#pragma mark -- mark 懒加载

- (UILabel *)nameLabel {
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc] init];
        _nameLabel.textColor = SKColorWithHex(0x444444);
        _nameLabel.font = SKFONT_BOLD_SIZE(14);
        _nameLabel.textAlignment = NSTextAlignmentLeft;
        _nameLabel.text = @" ";
        [self addSubview:_nameLabel];
    }
    return _nameLabel;
}

- (UILabel *)dateLabel {
    if (!_dateLabel) {
        _dateLabel = [[UILabel alloc] init];
        _dateLabel.text = @" ";
        _dateLabel.textColor = SKColorWithHex(0x999999);
        _dateLabel.font = SKFONT_BOLD_SIZE(10);
        _dateLabel.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_dateLabel];
    }
    return _dateLabel;
}

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.text = @" ";
        _contentLabel.textAlignment = NSTextAlignmentRight;
        _contentLabel.textColor = SKColorWithHex(0x20A40E);
        _contentLabel.font = SKFONT_BOLD_SIZE(14);
        [self addSubview:_contentLabel];
    }
    return _contentLabel;
}
@end
